<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // =都是右边给左边
    let num1 = 10
    let num2 = 20
    // 声明一个临时变量
    let temp
    // 把num1给temp
    temp = num1
    // 把num2给num1
    num1 = num2
    // 把temp给num2
    num2 = temp
    console.log(num1,num2);
  </script>
</body>
</html>